//
//  OrderManagerTableCell.m
//  YongChuanTradingArea
//
//  Created by 李冰 on 2017/9/15.
//  Copyright © 2017年 李冰. All rights reserved.
//

#import "OrderManagerTableCell.h"

@interface OrderManagerTableCell ()
@property (weak, nonatomic) IBOutlet UIImageView *coverImage;
@property (weak, nonatomic) IBOutlet UILabel *goodsName;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UILabel *orderNumber;
@property (weak, nonatomic) IBOutlet UILabel *orderCount;
@property (weak, nonatomic) IBOutlet UILabel *totalPrice;

@end

@implementation OrderManagerTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    _coverImage.layer.cornerRadius = 5;
    _coverImage.layer.masksToBounds = YES;
}

- (void)setModel:(OrderManagerListModel *)model {

    _model = model;
    
    [_coverImage sd_setImageWithURL:[NSURL URLWithString:_model.Icon] placeholderImage:PLACE_HOLDER];
    _goodsName.text = _model.GoodsName;
    _time.text = [NSDate timeStringWithTimestamp:[_model.CreatTime getTimestamp] formatterString:@"yyyy-MM-dd HH:mm:ss"];
    _orderNumber.text = [NSString stringWithFormat:@"订单号%@", _model.Ordersn];
    _orderCount.text = [NSString stringWithFormat:@"数量 %@", _model.PayNumber];
    _totalPrice.text = [NSString stringWithFormat:@"总价 %@", _model.TotalPrice];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
